package com.shrct.businessprocess.project;

import com.shrct.businessprocess.budget.RCBudget;
import com.shrct.businessprocess.budget.RCCostBreakDown;
import com.shrct.businessprocess.project.RCProject;
import com.shrct.businessprocess.project.RCProjectStat;
import com.shrct.businessprocess.purchase.RCBudgetContract;
import com.shrct.businessprocess.purchase.events.RCBudgetContractEventsListener;
import edu.fudan.mylang.pf.event.BaseEntityEventsListener;
import org.springframework.stereotype.Service;

@Service("com.shrct.businessprocess.project.RCBudgetContractListener4Stat")
public class RCBudgetContractListener4Stat extends BaseEntityEventsListener<RCBudgetContract> implements RCBudgetContractEventsListener {
  public void AmountChanged(final RCBudgetContract entity) {
    RCBudget _budget = entity.getBudget();
    RCCostBreakDown _cbd = _budget.getCbd();
    RCProject _project = _cbd.getProject();
    RCProjectStat _stat = _project.getStat();
    _stat.updateContractPrice();
  }
}
